function twoSum(numbers: number[], target: number): number[] {
    let low = 0, high = numbers.length - 1;

    while (low < high) {
        const sum = numbers[low] + numbers[high];
        if (sum === target) {
            return [low + 1, high + 1];
        } else if (sum < target) {
            low++;
        } else {
            high--;
        }
    }

    return [-1, -1]
};

const nums10 = [2, 7, 11, 15], target3 = 9
console.log(twoSum(nums10, target3));